package com.happyclub.pojo;

import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;

/**
 * @author 高欢
 * @description TODO
 * @date 2019/4/4
 */
@Entity
@Table(name = "TB_JUDGE", schema = "SCOTT")
public class TbJudge {
    private String id;
    private Long judgeType;
    private String fileId;
    private String userId;
    private Time judgeTime;
    private Long ok;
    private Time updateTime;
    private Time createTime;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "JUDGE_TYPE")
    public Long getJudgeType() {
        return judgeType;
    }

    public void setJudgeType(Long judgeType) {
        this.judgeType = judgeType;
    }

    @Basic
    @Column(name = "FILE_ID")
    public String getFileId() {
        return fileId;
    }

    public void setFileId(String fileId) {
        this.fileId = fileId;
    }

    @Basic
    @Column(name = "USER_ID")
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "JUDGE_TIME")
    public Time getJudgeTime() {
        return judgeTime;
    }

    public void setJudgeTime(Time judgeTime) {
        this.judgeTime = judgeTime;
    }

    @Basic
    @Column(name = "OK")
    public Long getOk() {
        return ok;
    }

    public void setOk(Long ok) {
        this.ok = ok;
    }

    @Basic
    @Column(name = "UPDATE_TIME")
    public Time getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Time updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "CREATE_TIME")
    public Time getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Time createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbJudge tbJudge = (TbJudge) o;
        return Objects.equals(id, tbJudge.id) &&
                Objects.equals(judgeType, tbJudge.judgeType) &&
                Objects.equals(fileId, tbJudge.fileId) &&
                Objects.equals(userId, tbJudge.userId) &&
                Objects.equals(judgeTime, tbJudge.judgeTime) &&
                Objects.equals(ok, tbJudge.ok) &&
                Objects.equals(updateTime, tbJudge.updateTime) &&
                Objects.equals(createTime, tbJudge.createTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, judgeType, fileId, userId, judgeTime, ok, updateTime, createTime);
    }
}
